using System.Data.Entity;
using System.Data.Entity.Infrastructure;
using SILAS.DAO.Mapping;
using SILAS.Entidades;

namespace SILAS.DAO
{
    public class SILASBDContext : DbContext
    {
        static SILASBDContext()
        {
            Database.SetInitializer<SILASBDContext>(null);
        }

        public SILASBDContext()
            : base("Name=SILASBDContext")
        {
        }


        public DbSet<Capacitacion> Capacitacions { get; set; }
        public DbSet<Cargo> Cargoes { get; set; }
        public DbSet<Categoria> Categorias { get; set; }
        public DbSet<Ciudadano> Ciudadanoes { get; set; }
        public DbSet<ConsejoDirectivo> ConsejoDirectivoes { get; set; }
        public DbSet<DetalleVisita> DetalleVisitas { get; set; }
        public DbSet<Distrito> Distritoes { get; set; }
        public DbSet<Empleado> Empleadoes { get; set; }
        public DbSet<FuenteAgua> FuenteAguas { get; set; }
        public DbSet<InstEjecutora> InstEjecutoras { get; set; }
        public DbSet<InstSupervisora> InstSupervisoras { get; set; }
        public DbSet<JASS> JASSes { get; set; }
        public DbSet<MedioTransporte> MedioTransportes { get; set; }
        public DbSet<Ruta> Rutas { get; set; }
        public DbSet<SAP> SAPs { get; set; }
        public DbSet<Sector> Sectors { get; set; }
        public DbSet<sysdiagram> sysdiagrams { get; set; }
        public DbSet<TipoFuenteAgua> TipoFuenteAguas { get; set; }
        public DbSet<TipoSAP> TipoSAPs { get; set; }
        public DbSet<TipoVia> TipoVias { get; set; }
        public DbSet<Ubicacion> Ubicacions { get; set; }
        public DbSet<Ubigeo> Ubigeos { get; set; }
        public DbSet<Visita> Visitas { get; set; }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            modelBuilder.Configurations.Add(new CapacitacionMap());
            modelBuilder.Configurations.Add(new CargoMap());
            modelBuilder.Configurations.Add(new CategoriaMap());
            modelBuilder.Configurations.Add(new CiudadanoMap());
            modelBuilder.Configurations.Add(new ConsejoDirectivoMap());
            modelBuilder.Configurations.Add(new DetalleVisitaMap());
            modelBuilder.Configurations.Add(new DistritoMap());
            modelBuilder.Configurations.Add(new EmpleadoMap());
            modelBuilder.Configurations.Add(new FuenteAguaMap());
            modelBuilder.Configurations.Add(new InstEjecutoraMap());
            modelBuilder.Configurations.Add(new InstSupervisoraMap());
            modelBuilder.Configurations.Add(new JASSMap());
            modelBuilder.Configurations.Add(new MedioTransporteMap());
            modelBuilder.Configurations.Add(new RutaMap());
            modelBuilder.Configurations.Add(new SAPMap());
            modelBuilder.Configurations.Add(new SectorMap());
            modelBuilder.Configurations.Add(new sysdiagramMap());
            modelBuilder.Configurations.Add(new TipoFuenteAguaMap());
            modelBuilder.Configurations.Add(new TipoSAPMap());
            modelBuilder.Configurations.Add(new TipoViaMap());
            modelBuilder.Configurations.Add(new UbicacionMap());
            modelBuilder.Configurations.Add(new UbigeoMap());
            modelBuilder.Configurations.Add(new VisitaMap());
        }
    }
}
